package com.lyf.boot.modules.system.entity.dto;

import com.lyf.boot.base.system.entity.SysUser;
import com.lyf.boot.validate.group.AddGroup;
import com.lyf.boot.validate.group.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author Luyufan
 * @date 2023/7/5 18:31
 */
@Data
@AutoMapper(target = SysUser.class)
public class SysUserDto implements Serializable {

    @Serial
    private static final long serialVersionUID = -7090252841681536149L;

    /**
     * 用户id
     */
    @NotNull(message = "用户Id不能为空", groups = {EditGroup.class})
    private Long userId;

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空", groups = {AddGroup.class, EditGroup.class})
    private String username;

    /**
     * 姓名
     */
    private String realName;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 手机号
     */
    private String phoneNumber;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 状态
     */
    @NotNull(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer status;

    /**
     * 性别
     */
    private String gender;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 角色id
     */
    private List<Long> roleIds;

    /**
     * 备注
     */
    private String remark;
}
